dir=$(shell pwd)
seeta_dir=$(dir)/../build
detect_dir=$(dir)/../SeetaMaskDetector/build

face_recognizer6_dir=$(dir)/../FaceRecognizer6
cmake=cmake

build:
	echo $(seeta_dir)
	g++ -std=c++11 detect.cpp -fPIC -shared -o libSeetaFaceWrap.so `pkg-config opencv4 --cflags --libs` \
		-I$(seeta_dir)/include/ \
		-I$(detect_dir)/include \
		-I$(face_recognizer6_dir) \
		-L$(seeta_dir)/lib64 \
		-L$(detect_dir)/lib64 \
		-lSeetaAuthorize -lSeetaFaceRecognizer610 -ltennis -ltennis_haswell -ltennis_pentium -ltennis_sandy_bridge -lSeetaMaskDetector200


go:
	DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(src_dir):$(seeta_dir) go build -o main main.go

#export DYLD_LIBRARY_PATH=/Users/bighuangbee/code/custom/SeetaFace6Open/libSeetaFaceWrap:/Users/bighuangbee/code/custom/SeetaFace6Open/build/include
env:
	export DYLD_LIBRARY_PATH=$(dir):$(seeta_dir)/lib64
